<!DOCTYPE html>
<!--[if lt IE 7]>       <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>          <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>          <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->  <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <title>XMLTV Parser - CumulusTV</title>
    <meta name="description" content="Your Personal Cable Network" />
    <meta name="author" content="Nick Felker - Felker Tech">
    <meta charset="UTF-8">
    <link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
    <!-- Mobile -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Font -->
    <link href='//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic' rel='stylesheet' type='text/css'>
    <!-- CSS -->
    <link href='../themes/daux/css/theme.min.css' rel='stylesheet' type='text/css'><link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
            <!-- Tipue Search -->
        <link href="../tipuesearch/tipuesearch.css" rel="stylesheet">
    
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body class="">
    
    <a href="https://github.com/fleker/cumulustv" target="_blank" id="github-ribbon" class="github-ribbon hidden-print"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="container-fluid fluid-height wrapper">
    <div class="navbar navbar-static-top hidden-print">
        <div class="container-fluid">
            <a class="brand navbar-brand pull-left" href="../index.html">CumulusTV</a>

    <div class="navbar-right navbar-form search">
        <i class="glyphicon glyphicon-search search__icon">&nbsp;</i>
        <input type="search" id="tipue_search_input" class="form-control search__field" placeholder="Search..." autocomplete="on" results=25 autosave=text_search>
    </div>
        </div>
    </div>
    <div class="row columns content">
        <div class="left-column article-tree col-sm-3 hidden-print">
            <!-- For Mobile -->
            <div class="responsive-collapse">
                <button type="button" class="btn btn-sidebar" id="menu-spinner-button">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div id="sub-nav-collapse" class="sub-nav-collapse">
                <!-- Navigation -->
                <ul class='nav nav-list'><li class=''><a href="../Getting_Started.html">Getting Started</a></li><li class=' has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>Syncing</a><ul class='nav nav-list'><li class=''><a href="../Syncing/Setting_Up_Google_Drive.html">Setting Up Google Drive</a></li><li class=''><a href="../Syncing/Setting_Up_Live_Channels.html">Setting Up Live Channels</a></li><li class=''><a href="../Syncing/Importing_Streams.html">Importing Streams</a></li><li class=''><a href="../Syncing/Editing_JSON.html">Editing JSON</a></li></ul></li><li class='open has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>EPG</a><ul class='nav nav-list'><li class=''><a href="../EPG/Creating_a_Program_Guide.html">Creating a Program Guide</a></li><li class='active'><a href="../EPG/XMLTV_Parser.html">XMLTV Parser</a></li></ul></li><li class=' has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>Features</a><ul class='nav nav-list'><li class=''><a href="../Features/Quick_Settings.html">Quick Settings</a></li><li class=''><a href="../Features/Exporting_M3u_Playlist.html">Exporting M3u Playlist</a></li></ul></li><li class=' has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>IPTV Channels</a><ul class='nav nav-list'><li class=''><a href="../IPTV_Channels/How_to_find_Channels.html">How to find Channels</a></li><li class=''><a href="../IPTV_Channels/Loading_Website.html">Loading Website</a></li><li class=''><a href="../IPTV_Channels/Radio.html">Radio</a></li><li class=''><a href="../IPTV_Channels/Parsing_M3U_Playlists.html">Parsing M3U Playlists</a></li><li class=''><a href="../IPTV_Channels/Linking_to_M3u_Playlist.html">Linking to M3u Playlist</a></li><li class=''><a href="../IPTV_Channels/Genres.html">Genres</a></li></ul></li><li class=''><a href="../Privacy_Policy.html">Privacy Policy</a></li><li class=' has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>Plugin API</a><ul class='nav nav-list'><li class=''><a href="../Plugin_API/Introduction.html">Introduction</a></li><li class=''><a href="../Plugin_API/Release_Notes.html">Release Notes</a></li></ul></li><li class=' has-children'><a href="#" class="aj-nav folder"><i class="arrow">&nbsp;</i>Troubleshooting</a><ul class='nav nav-list'><li class=''><a href="../Troubleshooting/Common_Issues.html">Common Issues</a></li></ul></li></ul>

                <div class="sidebar-links">
                    
                        <!-- Links -->
                        <a href="http://reddit.com/r/cumulustv" target="_blank">Reddit Forum</a><br><a href="https://play.google.com/apps/testing/com.felkertech.n.cumulustv" target="_blank">Register for Beta</a><br><a href="https://play.google.com/store/apps/details?id=com.felkertech.n.cumulustv" target="_blank">Download on Google Play</a><br><a href="https://github.com/fleker/cumulustv" target="_blank">GitHub Repo</a><br><a href="https://github.com/googlesamples/androidtv-sample-inputs" target="_blank">TIF Companion Library</a><br>
                        <div id="toggleCodeBlock">
                                                    <a id="toggleCodeBlockBtn" href="#" onclick="toggleCodeBlocks();">Show Code Blocks Inline</a><br>
                                                </div>

                        <!-- Twitter -->
                                                    <div class="twitter">
                                <hr/>
                                <iframe allowtransparency="true" frameborder="0" scrolling="no" style="width:162px; height:20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=handnf&amp;show_count=false"></iframe>
                            </div>
                        
                        <hr/>
                    
                </div>
            </div>
        </div>
        <div class="right-column  content-area col-sm-9">

            <div class="content-page">
                                    <div id="tipue_search_content" style="display:none"></div>
                
                <div class="doc_content">
                    <article>
            <div class="page-header sub-header clearfix">
            <h1><a href="../EPG/Creating_a_Program_Guide.html">EPG</a> <i class="glyphicon glyphicon-chevron-right"></i> <a href="../EPG/XMLTV_Parser.html">XMLTV Parser</a></h1>
            <span style="float: left; font-size: 10px; color: gray;">
                Tuesday, January 31, 2017            </span>
            <span style="float: right; font-size: 10px; color: gray;">
                8:05 PM            </span>
        </div>
    
    <p>The XMLTV parser is able to read EPG data and insert that into the program guide for a corresponding channel.</p>
<h2 id="page_Specification">Specification</h2>
<ul>
<li>The file is inside a root <code>tv</code> tag</li>
<li>Each program starts with a <code>programme</code> tag</li>
<li>Each program contains these attributes
<ul>
<li>
<code>start</code> and <code>stop</code> - Times when this program is to air and end, respectively</li>
<li>
<code>video-src</code> - The URL pointing to the stream</li>
<li>
<code>video-type</code> - A text-based string indicating what type of video this is</li>
</ul>
</li>
<li>Each program has these children:
<ul>
<li>
<code>title</code> - The display name for this program</li>
<li>
<code>desc</code> - A longer description for this program</li>
<li>
<code>icon</code> - A child with a single attribute, <code>src</code>, which is artwork for the show or episode. This is <strong>required</strong>.</li>
<li>
<code>category</code>- There can be multiple children which state the genres for this program</li>
<li>
<code>rating</code> - A child that can have multiple values for each parental rating of this program</li>
</ul>
</li>
</ul>
<p>If the provided XMLTV file does not match these specifications, the parser may not properly read it. The app may crash.</p>
<h2 id="page_Example">Example</h2>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!DOCTYPE tv SYSTEM &quot;xmltv.dtd&quot;&gt;
&lt;tv&gt;
    &lt;programme
        start=&quot;20150817000000 +0000&quot;
        stop=&quot;20150817000147 +0000&quot;
        video-src=&quot;https://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue.mp4&quot;
        video-type=&quot;HTTP_PROGRESSIVE&quot;&gt;
        &lt;title&gt;Introducing Gmail Blue&lt;/title&gt;
        &lt;desc&gt;Introducing Gmail Blue&lt;/desc&gt;
        &lt;icon src=&quot;https://storage.googleapis.com/android-tv/images/gmail.png&quot;/&gt;
        &lt;category&gt;EDUCATION&lt;/category&gt;
        &lt;category&gt;TECH_SCIENCE&lt;/category&gt;
        &lt;rating system=&quot;com.android.tv&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_14/US_TV_D/US_TV_L&lt;/value&gt;
        &lt;/rating&gt;
    &lt;/programme&gt;
    &lt;programme
        start=&quot;20150817000147 +0000&quot;
        stop=&quot;20150817004502 +0000&quot;
        video-src=&quot;https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/GoogleIO-2014-CastingToTheFuture.mp4&quot;
        video-type=&quot;HTTP_PROGRESSIVE&quot;&gt;
        &lt;title&gt;Google I/O 2014 - Casting To The Future&lt;/title&gt;
        &lt;desc&gt;Google I/O 2014 - Casting To The Future&lt;/desc&gt;
        &lt;icon
            src=&quot;https://storage.googleapis.com/gtv-videos-bucket/sample/images_480x270/ToTheFuture2-480x270.jpg&quot;/&gt;
        &lt;category&gt;EDUCATION&lt;/category&gt;
        &lt;category&gt;TECH_SCIENCE&lt;/category&gt;
        &lt;rating system=&quot;com.android.tv&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_PG/US_TV_D&lt;/value&gt;
        &lt;/rating&gt;
    &lt;/programme&gt;
    &lt;programme
        start=&quot;20150817004502 +0000&quot;
        stop=&quot;20150817005902 +0000&quot;
        video-src=&quot;https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/GoogleIO-2014-MakingGoogleCastReadyAppsDiscoverable.mp4&quot;
        video-type=&quot;HTTP_PROGRESSIVE&quot;&gt;
        &lt;title&gt;Google I/O 2014 - Making Google Cast Ready Apps Discoverable&lt;/title&gt;
        &lt;desc&gt;Google I/O 2014 - Making Google Cast Ready Apps Discoverable&lt;/desc&gt;
        &lt;icon
            src=&quot;https://storage.googleapis.com/gtv-videos-bucket/sample/images_480x270/MakingGoogleCastReadyAppsDiscoverable-480-270.jpg&quot;/&gt;
        &lt;category&gt;EDUCATION&lt;/category&gt;
        &lt;category&gt;TECH_SCIENCE&lt;/category&gt;
        &lt;rating system=&quot;com.android.tv&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_14/US_TV_D/US_TV_L&lt;/value&gt;
        &lt;/rating&gt;
    &lt;/programme&gt;
    &lt;programme
        start=&quot;20150817005902 +0000&quot;
        stop=&quot;20150817010113 +0000&quot;
        video-src=&quot;https://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole.mp4&quot;
        video-type=&quot;HTTP_PROGRESSIVE&quot;&gt;
        &lt;title&gt;Introducing Google Fiber to the Pole&lt;/title&gt;
        &lt;desc&gt;Introducing Google Fiber to the Pole.&lt;/desc&gt;
        &lt;icon src=&quot;https://storage.googleapis.com/android-tv/images/fiber.png&quot;/&gt;
        &lt;category&gt;EDUCATION&lt;/category&gt;
        &lt;category&gt;TECH_SCIENCE&lt;/category&gt;
        &lt;rating system=&quot;com.android.tv&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_PG/US_TV_D&lt;/value&gt;
        &lt;/rating&gt;
    &lt;/programme&gt;
    &lt;programme
        start=&quot;20150817010113 +0000&quot;
        stop=&quot;20150817010315 +0000&quot;
        video-src=&quot;https://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole.mp4&quot;
        video-type=&quot;HTTP_PROGRESSIVE&quot;&gt;
        &lt;title&gt;Introducing Google Nose&lt;/title&gt;
        &lt;desc&gt;Introducing Google Nose&lt;/desc&gt;
        &lt;icon src=&quot;https://storage.googleapis.com/android-tv/images/fiber.png&quot;/&gt;
        &lt;category&gt;EDUCATION&lt;/category&gt;
        &lt;category&gt;TECH_SCIENCE&lt;/category&gt;
        &lt;rating system=&quot;US_TV&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_PG/US_TV_D&lt;/value&gt;
        &lt;/rating&gt;
        &lt;rating system=&quot;com.android.tv&quot;&gt;
            &lt;value&gt;com.android.tv/US_TV/US_TV_PG/US_TV_D&lt;/value&gt;
        &lt;/rating&gt;
    &lt;/programme&gt;
&lt;/tv&gt;
</code></pre>

        <nav>
        <ul class="pager">
            <li><a href="../EPG/Creating_a_Program_Guide.html">Previous</a></li>            <li><a href="../Features/Quick_Settings.html">Next</a></li>        </ul>
    </nav>
    </article>

                </div>
            </div>
        </div>
    </div>
</div>

    
    <!-- jQuery -->
    <script src="../themes/daux/js/jquery-1.11.3.min.js"></script>

    <!-- hightlight.js -->
    <script src="../themes/daux/js/highlight.pack.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>

    <!-- JS -->
    
    <script src="../themes/daux/js/daux.js"></script>

            <!-- Tipue Search -->
        <script type="text/javascript" src="../tipuesearch/tipuesearch_set.js"></script>
        <script type="text/javascript" src="../tipuesearch/tipuesearch.min.js"></script>

        <script>
            window.onunload = function(){}; // force $(document).ready to be called on back/forward navigation in firefox
            $(document).ready(function() {
                $('#tipue_search_input').tipuesearch({
                    'show': 10,
                    'mode': 'json',
                    'base_url': '../'
                });
            });
        </script>
    
</body>
</html>
